package org.zfes.snowier.common.monitor.utils;
import java.net.InetAddress;    
public class NetStateUtil {


	public static boolean ping(String ipAddress) throws Exception {
	    int  timeOut =  3000 ; 
	    boolean status = InetAddress.getByName(ipAddress).isReachable(timeOut);
	    return status;
	}

	    public static void main(String[] args) throws Exception {    
//	    	NetStateUtil netState = new NetStateUtil();    
	        System.out.println(ping("127.0.0.1"));    
	     
	    }    
}
